package cate.common.table.activity.heroup.call;

import cate.common.table.ESheet;
import easy.java.dev.note.NoteClass;

import java.util.LinkedList;
import java.util.List;

@NoteClass(value = "英雄上新活动-召唤")
public class HeroUpCallSheet extends ESheet<HeroUpCallRow> {
    @Override
    public String getSheetName() {
        return "召唤";
    }

    public HeroUpCallRow getMode(int conId, int callMode) {
        for (HeroUpCallRow row : getList()) {
            if (row.confId == conId & row.callType == callMode) {
                return row;
            }
        }
        return null;
    }

    public List<Integer> getModeTypeList(int conId) {
        List<Integer> list = new LinkedList<>();
        for (HeroUpCallRow row : getList()) {
            if (row.confId == conId) {
                list.add(row.callType);
            }
        }
        return list;
    }
}
